//
//  JXLTestViewController.swift
//  MicroBlog
//
//  Created by 贾晓磊 on 16/9/21.
//  Copyright © 2016年 贾晓磊. All rights reserved.
//

import UIKit

class JXLTestViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = UIColor.white
        
        addNavRightBarButtonItem()
        
           }

    //添加右边的barButtonItem
    private func addNavRightBarButtonItem() -> Void {
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "push", imageName: nil, target: self, action: #selector(pushAction))
        
    }
    
    //添加右边的barButtonItem的点击事件
   func pushAction() {
    let viewController = JXLTestViewController()
    navigationController?.pushViewController(viewController, animated: true)
    }
    
}
